LOADING...

加载过慢请开启缓存(浏览器默认开启)

loading

计算机图形学①

2021/4/18

闫令琪教授的games101课程笔记哒

1.Review of Linear Algebra(线性变换总览)

vector:(dot product,cross product)点乘,叉乘

matrices:(matrix-matrix,matrix-vector mult)矩阵和矩阵,矩阵和向量乘法

vector:

length of a vector written as (向量长度)
$$
\vert\vert\vec{a}\vert\vert
$$
unit vector as(单位向量)
$$
\hat a=\vec a/\vert\vert\vec{a}\vert\vert
$$


dot product(点乘)

image-20210418114037370

for is unit vector(对每个单位向量而言) :
$$
\cos \theta=\hat a ·\hat b
$$
properties(属性):

image-20210418114720929

in cartesian coordinates(在笛卡尔坐标系):

image-20210418114930611


dot product in graphic:

  • find angle between two vectors

    (e.g. cosine of angle between light source and surface)

  • find projection of one vector on another

image-20210418115359464

other benefits of dot product:

image-20210418115656407

测量两个方向有多近

分解一个向量

确定两个向量是同向还是反向


cross product(叉乘)

image-20210418115836909

叉积与两个初始向量正交,由右手法则定义方向,用于构造坐标

properties:

image-20210418120226743

对了顺带一提,OpenGL是右手系,DirectX,unity为左手系

image-20210418120436013

dot product in graphic:

image-20210418120513504

image-20210418120557223

叉积可以定义左和右,定义里和外。

matrix(矩阵)

image-20210418120741005

如图所示为3行2列矩阵。

multiplication :

image-20210418120918703

properties :

image-20210418120951541

妹有交换率啊!!

image-20210418121058495

在2d中对于Y轴对称

image-20210418121158584

AB的转置矩阵=B的转置乘A的转置

image-20210418121340439


点乘和叉乘在向量中的表示

image-20210418122911370


4.18 12:31补完!